package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmzAssetUsageDetailMapper;
import com.ruoyi.system.domain.HmzAssetUsageDetail;
import com.ruoyi.system.service.IHmzAssetUsageDetailService;

/**
 * 用于存储资产领用明细信息的Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-10
 */
@Service
public class HmzAssetUsageDetailServiceImpl implements IHmzAssetUsageDetailService 
{
    @Autowired
    private HmzAssetUsageDetailMapper hmzAssetUsageDetailMapper;

    /**
     * 查询用于存储资产领用明细信息的
     * 
     * @param id 用于存储资产领用明细信息的主键
     * @return 用于存储资产领用明细信息的
     */
    @Override
    public HmzAssetUsageDetail selectHmzAssetUsageDetailById(Long id)
    {
        return hmzAssetUsageDetailMapper.selectHmzAssetUsageDetailById(id);
    }

    /**
     * 查询用于存储资产领用明细信息的列表
     * 
     * @param hmzAssetUsageDetail 用于存储资产领用明细信息的
     * @return 用于存储资产领用明细信息的
     */
    @Override
    public List<HmzAssetUsageDetail> selectHmzAssetUsageDetailList(HmzAssetUsageDetail hmzAssetUsageDetail)
    {
        return hmzAssetUsageDetailMapper.selectHmzAssetUsageDetailList(hmzAssetUsageDetail);
    }

    /**
     * 新增用于存储资产领用明细信息的
     * 
     * @param hmzAssetUsageDetail 用于存储资产领用明细信息的
     * @return 结果
     */
    @Override
    public int insertHmzAssetUsageDetail(HmzAssetUsageDetail hmzAssetUsageDetail)
    {
        hmzAssetUsageDetail.setCreateTime(DateUtils.getNowDate());
        return hmzAssetUsageDetailMapper.insertHmzAssetUsageDetail(hmzAssetUsageDetail);
    }

    /**
     * 修改用于存储资产领用明细信息的
     * 
     * @param hmzAssetUsageDetail 用于存储资产领用明细信息的
     * @return 结果
     */
    @Override
    public int updateHmzAssetUsageDetail(HmzAssetUsageDetail hmzAssetUsageDetail)
    {
        hmzAssetUsageDetail.setUpdateTime(DateUtils.getNowDate());
        return hmzAssetUsageDetailMapper.updateHmzAssetUsageDetail(hmzAssetUsageDetail);
    }

    /**
     * 批量删除用于存储资产领用明细信息的
     * 
     * @param ids 需要删除的用于存储资产领用明细信息的主键
     * @return 结果
     */
    @Override
    public int deleteHmzAssetUsageDetailByIds(Long[] ids)
    {
        return hmzAssetUsageDetailMapper.deleteHmzAssetUsageDetailByIds(ids);
    }

    /**
     * 删除用于存储资产领用明细信息的信息
     * 
     * @param id 用于存储资产领用明细信息的主键
     * @return 结果
     */
    @Override
    public int deleteHmzAssetUsageDetailById(Long id)
    {
        return hmzAssetUsageDetailMapper.deleteHmzAssetUsageDetailById(id);
    }
}
